-- GENERATED SPELL FOR [Dar'Khan Drathir] --


function spell0_16329(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(21068,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16329', 26000, 1)
end

function spell1_16329(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(38660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16329', 5000, 1)
end

function spell2_16329(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16329', 3000, 1)
end

function Sorts_16329(pUnit, Event)
local choix_sorts_16329 = math.random(0, 2)
if choix_sorts_16329 == 0 then
pUnit:RegisterEvent('spell0_16329', 1, 1)
end
if choix_sorts_16329 == 1 then
pUnit:RegisterEvent('spell1_16329', 1, 1)
end
if choix_sorts_16329 == 2 then
pUnit:RegisterEvent('spell2_16329', 1, 1)
end
end

function mob16329_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16329', math.random(1500, 3000), 1)
end

function mob16329_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16329_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16329_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16329, 1, 'mob16329_Action')
RegisterUnitEvent(16329, 2, 'mob16329_Leave')
RegisterUnitEvent(16329, 3, 'mob16329_Kill')
RegisterUnitEvent(16329, 4, 'mob16329_Die')
